/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../../../model/baseModel';

const { adminPath } = useGlobSetting();

export interface Bas3dwhArea extends BasicModel<Bas3dwhArea> {
  code?: string; // 区域编码
  name?: string; // 区域名称
  cellQty?: number; // 容量
  whCode?: string; // 所属仓库
}

export const bas3dwhAreaList = (params?: Bas3dwhArea | any) =>
  defHttp.get<Bas3dwhArea>({ url: adminPath + '/bas/wms/area/list', params });

export const bas3dwhAreaListData = (params?: Bas3dwhArea | any) =>
  defHttp.post<Page<Bas3dwhArea>>({ url: adminPath + '/bas/wms/area/listData', params });

export const bas3dwhAreaForm = (params?: Bas3dwhArea | any) =>
  defHttp.get<Bas3dwhArea>({ url: adminPath + '/bas/wms/area/form', params });

export const bas3dwhAreaSave = (params?: any, data?: Bas3dwhArea | any) =>
  defHttp.postJson<Bas3dwhArea>({ url: adminPath + '/bas/wms/area/save', params, data });

export const bas3dwhAreaDelete = (params?: Bas3dwhArea | any) =>
  defHttp.get<Bas3dwhArea>({ url: adminPath + '/bas/wms/area/delete', params });

export const treeData = (params?: Bas3dwhArea | any) =>
  defHttp.post<Bas3dwhArea>({ url: adminPath + '/bas/wms/area/treeData', params });